package com.roy.galaxy.facade;

import com.roy.galaxy.service.IdGeneratorServiceImpl;
import com.roy.galaxy.algorithm.LogUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by mc on 18/4/10.
 */
@Service
public class IdGeneratorFacade {

    @Autowired
    private IdGeneratorServiceImpl idGeneratorService;

    /**
     * 获取id
     * @return
     */
    public Long getId(Integer bizId){
        try {
           return idGeneratorService.generatorId(bizId);
        } catch (Exception e) {
            LogUtil.getDefaultLog().error("IdGeneratorFacade#getId,error:{}", e.getMessage());
            return null;
        }
    }
}
